home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-21 | 9.7 KB | 305 lines | [TEXT/MMCC] |
- About IM Self-Extractor Customization & Other Technical Poop
- ============================================================
-
- Revised 94.12.31
- Raymond Lau
-
- Revised 95.08.03
- Rob Thorne (RMT)
-
-
- A technical memorandum.
-
- Copyright © 1990-96, Aladdin Systems, Inc. All Rights Reserved.
-
- ****************************************************************************
-
- InstallerMaker Extensions
- --------------------------
-
- The IM SEA supports execution of code resources during installation. All such
- atoms are strictly optional.
-
- Note 1 -- when these atoms are called, the current resource file will be set to
- the self-extractor and should be maintained.
-
- Note 2 -- 68k code rsrcs are assumed. If you want to write PPC code, create an
- accelerated rsrc.
-
- Note 3 -- Please be sure to see the Destinations Extensions documentation. The
- ILoc atom is documented therein.
-
-
- refcon field
- ============
- Starting with IM 3.0, all atoms will be called with a refcon field which initially
- points to an unsigned long with the value zero. Any atom may set the pointed to
- value to whatever it desires. The pointed to value will be maintained in calls to
- any other atom.
-
-
- Packages field
- ==============
-
- The interpretation of packages for the code rsrcs is:
-
- IM 2.0: packages should be interpreted as a 16 bit field. Bit 0 is the lowest bit.
-
- IM 3.0: packages should be interpreted as a 128 bit field. packages[0] contains
- bits 0-31 where 0 is the lowest bit. packages[1] contains bits 32-63 where
- 32 is the lowest bit. Similarly for packages[2] and packages[3].
-
- packages is a bit mask where bit 0 set means std pkg, bit 1 set means pkg A,
- bit 2 means B, etc. For compatibility, a value of zero is synonymous with all
- ones.
-
- The packages field typically specifies the currently selected pkgs unless
- otherwise noted.
-
- IMEnvironsRec field
- ===================
-
- typedef struct {
- unsigned long *packages;
- short userVol;
- long userDir;
- short userSysVol;
- long userSysDir;
- } IMEnvironsRec;
-
- This structure is used by various atoms.
-
- Unless otherwise noted, the meaning of the files is:
-
- The packages field is documented above.
-
- The userVol/userDir specifies the USF or USV. In the latter case, userDir will
- be 2L.
-
- The userSysVol/userSysDir specifies the potentially blessed folder on the user
- specified system vol, if the developer allows the user to make this choice.
- Otherwise, it specifies the blessed folder on the startup volume.
-
-
- IFst
- ====
-
- IM 3.0 id = 256
-
- pascal short IFst (unsigned long *refcon)
-
- 'IFst' is called immediately upon startup and after initializing several internal
- data structures but before any user interaction (such as the startup pict) occurs.
-
- The IFst should return 0 on success or non-zero to abort.
-
-
-
- IBeg
- ====
-
- IM 1.0 id = 0 [*** NO LONGER SUPPORTED IN 3.0 ***]
-
- pascal short IBeg(unsigned char *pw)
-
- IM 2.0 id = 128 [for compat only]
-
- pascal short IBeg(unsigned char *pw)
-
- IM 3.0 id = 256
-
- pascal short IBeg(unsigned char *pw,unsigned long *refcon)
-
-
- If an 'IBeg' rsrc exists, it will be called right after showing the splash screens
- but before prompting the user for the destination.
-
- The pw argument is only relevant in the case of an encrypted SEA. A zero length
- pascal string is passed in. The IBeg may choose to return a PW in it and if correct,
- that PW will be used instead of prompting the user.
-
- The IBeg should return 0 on success or non-zero to abort.
-
-
-
-
- ICnd
- ====
-
- To support custom conditions, for each top level item, a call will be made to an 'ICnd'
- resource if it exists. This resource will be passed the 3 custom conditions flags.
- Flag 1 will be bit 0, flag 2 will be bit 1, and flag 3 will be bit 2. The resource
- will be called as:
-
- IM 1.0 id = 0: [*** NO LONGER SUPPORTED IN 3.0 ***]
-
- pascal short ICnd(short flags);
-
- IM 2.0 id = 128: [compat only]
-
- pascal short ICnd(short flags,unsigned short packages);
-
- IM 3.0 id = 256:
-
- pascal short ICnd(short flags,unsigned long *packages,unsigned long *refcon);
-
-
- The atom should return 0 if the item SHOULD be installed and 1 if the item SHOULD NOT.
- Note that the ICnd is more higher level than the IMid. Information returned by the ICnd
- will be used in size computations, etc. (Bec. of the possibility of segmented
- archives, we may not have access to more extensive info like file names, etc.)
-
-
- IPkg
- ====
-
- IM 3.0 id = 256:
-
- pascal void IPkg(unsigned long *packages,unsigned long *refcon);
-
- The IPkg atom is the package availability atom. It should RETURN in packages
- which packages should be made unavailable to the user given the current machine
- configuration, etc. By default, no packages are made unavailable. A zero
- bit indicates that a package should be made unavailable.
-
- The IPkg atom is ONLY used in custom install. Note that the IPkg can only
- exclude packages by making them unavailable. That is, if the package
- conditions make a package unavailable, the IPkg cannot change this. It can
- only make packages which are available given package conditions unavailable.
- Also, the IPkg cannot make the standard package unavailable. If there's a
- standard package defined, then it is always available.
-
- Note that it is possible to not have a standard package defined, in which case
- the installer will only have custom install, no simple install.
-
-
-
- IMid
- ====
-
- Before each file/folder is unstuffed, a call will be made to an 'IMid' resource if it
- exists. This resource will be called BEFORE checking to see if an existing item
- exists, if an existing item is newer. However, it will be done AFTER checking
- for other conditions such as presence of color, system version, etc. It will be
- called as a pascal function:
-
- IM 1.0 id = 0: [*** NO LONGER SUPPORTED IN 3.0 ***]
-
- pascal short IMid(short userVol,long userDir,
- short *destVol,long *destDir,
- short isFolder,
- char *name,
- unsigned long creationDate,
- unsigned long modificationDate,
- OSType type,OSType creator);
-
- IM 2.0 id = 128: [for compat only]
-
- pascal short IMid(short userVol,long userDir,
- short *destVol,long *destDir,
- short isFolder,
- char *name,
- unsigned long creationDate,
- unsigned long modificationDate,
- OSType type,OSType creator,
- unsigned short packages,
- short after);
-
- IM 3.0 id = 256:
-
- pascal short IMid( IMEnvironsRec *environ,
- short *destVol,long *destDir,
- short isFolder,
- char *name,
- unsigned long creationDate,
- unsigned long modificationDate,
- OSType type,OSType creator,
- short after,short tag,unsigned long *refcon);
-
-
- environ is as expected.
- destVol/destDir will be the current destination vol/dir.
- isFolder will be true if the item is a folder.
- name is the name of the item (pascal string).
- creationDate/modificationDate are the obvious things as are type/creator except
- of course that type/creator are valid only if not isFolder.
- after (new to 2.0+) -- The IMid is now called both BEFORE an item is installed and AFTER.
- after will be TRUE if this is the AFTER call. Note that changing destVol,destDir,name
- in an AFTER call accomplishes nothing.
- tag (new to 3.0+) will be the 2 byte user settable tag associated with each item.
-
- You should return 0 to continue with installation of this item,1 to skip it,
- 2 to cancel.
- You may modify destVol, destDir and name.
-
-
-
- IEnd
- ====
-
- At the end of installation, a call will be made to an 'IEnd' resource if it
- exists..
-
- IM 1.0 id = 0 [*** NO LONGER SUPPORTED IN 3.0 ***]
-
- pascal short IEnd(short abort,short vol,long dir,char *name)
-
- IM 2.0 id = 128 [for compat only]
-
- pascal short IEnd(short abort,short vol,long dir,char *name,
- unsigned short packages)
-
- IM 3.0 id = 256
-
- pascal short IEnd(short abort,IMEnvironsRec *environ,
- short *restartFlag,unsigned long *refcon)
-
- abort will be non-zero if installation was aborted.
-
- environ is as expected. **NOTE** that this differs from 3.0 in that the
- userVol/userDir will now always be the actual userVol/userDir. Before
- we passed the vol/parID/name of the USF or vol/2L/zero length string of
- the USV. For reference, the old info is given below under [Pre 3.0].
- This change makes the IEnd's conventions match those of the other atoms.
-
- restartFlag indicates whether the current installation was set to trigger a
- system restart. The atom may change this but it is responsible for any
- UI inconsistencies.
-
- The atom should return 0 on sucess, non-zero to abort.
-
- [Pre 3.0]
-
- vol/dir/name will contain the user specified folder directory. If a volume was
- specified, then vol will be that volume and name will be a zero length string.
- If neither a user specified folder nor volume was used, then vol,dir will be
- zero and name will be a zero length string.
-
-
- ----------------------------------------------------------------------------------------
-
-
-
- For the Select Existing USF dialog, the New folder 2051 CNTL is now localizable.
- The refCon field is interpreted as follows:
- Zero -- if first character is not a space, the END of the title drawn is the right
- edge of the SICN.
- if first character is a space, the pen location of the first character drawn
- is the left edge of the SICN.
- Positive -- the refCon is interpreted as an absolute offset from the left edge of the
- controlRect to the left edge of the SICN.
- Negative -- the refCon is interpreted as an absolute offset from the left edge of the
- controlRect to the right edge of the SICN.
-
-
- ----------------------------------------------------------------------------------------
-
- Technical Notes:
-
- When there is more than one file, all files are unstuffed into a new folder and
- any conflicting names will be automatically overwritten. (You shouldn't have 2
- things w/the same name in an installation scenario anyway!)
-
- In the Join SEA, when the next segment is sought, the root and then the desktop of
- all online volumes are checked first. Then the user is prompted for a disk.
-